<%@ page import="com.confidena.PersonGame" %>



<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'taskPayDate', 'error')} ">
	<label for="taskPayDate">
		<g:message code="personGame.taskPayDate.label" default="Task Pay Date" />
		
	</label>
	<g:datePicker name="taskPayDate" precision="day"  value="${personGameInstance?.taskPayDate}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'gameList', 'error')} ">
	<label for="gameList">
		<g:message code="personGame.gameList.label" default="Game List" />
		
	</label>
	<g:select id="gameList" name="gameList.id" from="${com.confidena.GameList.list()}" optionKey="id" value="${personGameInstance?.gameList?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'gameListOut', 'error')} ">
	<label for="gameListOut">
		<g:message code="personGame.gameListOut.label" default="Game List Out" />
		
	</label>
	<g:select id="gameListOut" name="gameListOut.id" from="${com.confidena.GameList.list()}" optionKey="id" value="${personGameInstance?.gameListOut?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'creationDate', 'error')} required">
	<label for="creationDate">
		<g:message code="personGame.creationDate.label" default="Creation Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="creationDate" precision="day"  value="${personGameInstance?.creationDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'creditBalance', 'error')} required">
	<label for="creditBalance">
		<g:message code="personGame.creditBalance.label" default="Credit Balance" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="creditBalance" type="number" value="${personGameInstance.creditBalance}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'game', 'error')} required">
	<label for="game">
		<g:message code="personGame.game.label" default="Game" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="game" name="game.id" from="${com.confidena.Game.list()}" optionKey="id" required="" value="${personGameInstance?.game?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'gameCircle', 'error')} ">
	<label for="gameCircle">
		<g:message code="personGame.gameCircle.label" default="Game Circle" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${personGameInstance?.gameCircle?}" var="g">
    <li><g:link controller="gameCircle" action="show" id="${g.id}">${g?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="gameCircle" action="create" params="['personGame.id': personGameInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'gameCircle.label', default: 'GameCircle')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'gameCircleOrigin', 'error')} required">
	<label for="gameCircleOrigin">
		<g:message code="personGame.gameCircleOrigin.label" default="Game Circle Origin" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="gameCircleOrigin" name="gameCircleOrigin.id" from="${com.confidena.GameCircle.list()}" optionKey="id" required="" value="${personGameInstance?.gameCircleOrigin?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'isBoot', 'error')} ">
	<label for="isBoot">
		<g:message code="personGame.isBoot.label" default="Is Boot" />
		
	</label>
	<g:checkBox name="isBoot" value="${personGameInstance?.isBoot}" />
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'lists', 'error')} ">
	<label for="lists">
		<g:message code="personGame.lists.label" default="Lists" />
		
	</label>
	<g:select name="lists" from="${com.confidena.GameList.list()}" multiple="multiple" optionKey="id" size="5" value="${personGameInstance?.lists*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'person', 'error')} required">
	<label for="person">
		<g:message code="personGame.person.label" default="Person" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="person" name="person.id" from="${com.confidena.security.Person.list()}" optionKey="id" required="" value="${personGameInstance?.person?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'state', 'error')} required">
	<label for="state">
		<g:message code="personGame.state.label" default="State" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="state" type="number" value="${personGameInstance.state}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: personGameInstance, field: 'taskPay', 'error')} ">
	<label for="taskPay">
		<g:message code="personGame.taskPay.label" default="Task Pay" />
		
	</label>
	<g:checkBox name="taskPay" value="${personGameInstance?.taskPay}" />
</div>

